package BookAndAuthor;

public class Book {
	private String name;
	private double price;
	private Book_Author[] author;

	private int qty = 0;

	public Book(String name, Book_Author[] auth, double price) {
		this.name = name;
		author = auth;
		this.price = price;
	}

	public Book(String name, Book_Author[] auth, double price, int qty) {
		this.name = name;
		author = auth;
		this.price = price;
		this.qty = qty;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public int getQty() {
		return qty;
	}

	public void setQty(int qty) {
		this.qty = qty;
	}

	public String getName() {
		return name;
	}

	public String toString() {
		String s;
		int j = 1;
		s = "Book[name=" + this.getName() + ",{";

		for (Book_Author i : this.author) {
			s += "Author" + j++ + ":";
			s += i.toString();
		}

		s += "}price=" + this.getPrice() + ",qty=" + this.getQty() + "]";
		return s;
	}

}
